<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>activeElement</title>
</head>
<body>
	<input type="text">
	<script>
		document.querySelector('input').focus()

		console.log(document.activeElement)
	</script>
</body>
</html>